<template>
    <div class="nav-container" v-show="isShowNav">
        <div class="nav-wrapper">
            <div class="left-goback">
                <slot name="goBack"></slot>
            </div>

            <div class="middle-title">
                <slot name="nav-title">
                    {{this.$route.meta.title}}
                </slot>
            </div>

            <div class="right-icon">
                <slot name="right"></slot>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    computed:{
        isShowNav:function(){
            return this.$route.meta.isShowNav;
        }
    }
}
</script>

<style scoped>
*{
    margin:0;
    padding:0;
}
.nav-container{
    width:100%;
    height:64px;
    position: fixed;
    top:0px;
    left:0px;
}
.nav-wrapper{
    width:100%;
    height:100%;
    border-bottom:1px solid lightgray;
    display: inline-flex;
    justify-content: space-around;
    align-items: center;
    background-color:white;
}
.left-goback{
    width:15%;
    height:100%;
    /* background-color: lightsalmon; */
    display: inline-flex;
    justify-content:center;
    align-items: center;
}
.left-goback img{
    width:1.3rem;
    height:1.3rem;
}
.middle-title{
    width:70%;
    height:100%;
    display: inline-flex;
    justify-content:center;
    align-items: center;
}
.right-icon{
    width:15%;
    height:100%;
    /* background-color: lightseagreen; */
    display: inline-flex;
    justify-content:center;
    align-items: center;
}
.right-icon img{
    width:1.3rem;
    height:1.3rem;
}
</style> 